﻿
Public Class ConfigReportAbstract
    Inherits UserControl

    Protected Const BASE_URI As String = "/Excel/ReportGenerator.aspx"

    Public Sub New()

    End Sub

    Public Sub New(nom As String, tipus As EnumTipusReport)
        _nomReport = nom
        _tipusReport = tipus
    End Sub

    Public Overridable Sub Generar()
        Throw New NotImplementedException("Generar must be overrided")
    End Sub

    Private _tipusReport As EnumTipusReport
    Public ReadOnly Property tipusReport As EnumTipusReport
        Get
            Return _tipusReport
        End Get
    End Property

    Private _nomReport As String
    Public ReadOnly Property nomReport As String
        Get
            Return _nomReport
        End Get
    End Property

    Public Overrides Function ToString() As String
        Return nomReport
    End Function


    Public Shared Function ReportList() As List(Of TipusReport)
        Dim Resultat As List(Of TipusReport) = New List(Of TipusReport)

        Resultat.Add(New TipusReport() With {.TipusReport = EnumTipusReport.ControlDeCaixa, .NomReport = My.Resources.StringLibrary.InformeControlDeCaixa})
        Resultat.Add(New TipusReport() With {.TipusReport = EnumTipusReport.EstatHostal, .NomReport = My.Resources.StringLibrary.InformeEstatHostal})
        Resultat.Add(New TipusReport() With {.TipusReport = EnumTipusReport.PlantillaHoraris, .NomReport = My.Resources.StringLibrary.PlantillaDocuments})
        Resultat.Add(New TipusReport() With {.TipusReport = EnumTipusReport.ResumDiari, .NomReport = My.Resources.StringLibrary.InformeResumDiari})
        Resultat.Add(New TipusReport() With {.TipusReport = EnumTipusReport.DetallReserves, .NomReport = My.Resources.StringLibrary.InformeResumReserves})
        Resultat.Add(New TipusReport() With {.TipusReport = EnumTipusReport.DetallGastosIngressos, .NomReport = My.Resources.StringLibrary.InformeResumGastosIngressos})
        Resultat.Add(New TipusReport() With {.TipusReport = EnumTipusReport.HoresTreballades, .NomReport = My.Resources.StringLibrary.InformeHoresTreballades})
        Resultat.Add(New TipusReport() With {.TipusReport = EnumTipusReport.Neteges, .NomReport = My.Resources.StringLibrary.InformeNeteges})
        Resultat.Add(New TipusReport() With {.TipusReport = EnumTipusReport.ThingsToDo, .NomReport = My.Resources.StringLibrary.InformeThingsToDo})

        Return Resultat
    End Function

End Class
